package com.dlc.shop.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.dlc.shop.bean.app.dto.MyOrderDto;
import com.dlc.shop.bean.model.OrderVirtualInfo;
import org.apache.ibatis.annotations.Param;

/**
 * 订单自提信息
 *
 * @author lhd
 * @date 2021-09-15 15:45:35
 */
public interface OrderVirtualInfoMapper extends BaseMapper<OrderVirtualInfo> {

    /**
     * 获取最新的券码
     *
     * @param shopId 商家id
     * @return 券码
     */
    String getNewCodeInfo(@Param("shopId") Long shopId);

    /**
     * 通过核销码获取订单信息
     * @param shopId 店铺id
     * @param code 核销码
     * @return 订单信息
     */
    MyOrderDto getOrderByCode(@Param("shopId") Long shopId, @Param("code") String code);
}
